<template>
	<view class="pages">
		<!-- 背景图 -->
		<image class="pages-bgimg" src="/static/images/common/top-bgimg.png" mode="scaleToFill"></image>
		<!-- 我的信息 -->
		<view class="my-top-box">
			<view class="userinfo-box row-box ">
				<view class="userinfo flex">
					<view class="avatar-box">
						<image class="avatar" src="/static/images/common/avatar.png" mode="scaleToFill"></image>
					</view>
					<view class="info-box">
						<view class="nickname fc-w">
							阿拉蕾
						</view>
						<view class="info-phone ">
							13312341234
						</view>
						<view class="info-notes row-box mt-20" @click="$fn.toPages('/pages/area/manageInfo')">
							<view class="">
								<text class="info-notes-btn mr-20">省代理</text>
								<text class="info-notes-text">业绩分红比例：10%</text>
							</view>
							<u-icon name="arrow-right" color="#FFF" size="16"></u-icon>
						</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 我的收益 -->
		<view class="pages-card">
			<view class="cash-box row-box pb-20">
				<view class="">
					<view class="tips fc-9">
						可提现金额(元)
					</view>
					<view class="cash fc-ac fw-6">
						518.88
					</view>
				</view>
				<view class="cash-btn fc-w fcc" @click="$fn.toPages('/pages/commission/withdrawal')">
					申请提现
				</view>
			</view>

			<view class="row-box ">
				<view class="tab-item fcc" v-for="(item,index) in dividendList" :key="index"
					@click="$fn.toPages('/pages/area/performanceData')">
					<view class="fc-9 flex align-items-center">
						<text>{{item.title}}</text>
						<p-help></p-help>
					</view>
					<view class="flex align-items-center mt-10">
						<text class="fc-3 fw-6 val">{{item.value}}</text>
						<text class="iconfont fc-9 fcc fs-sm ml-10 ">
							&#xe687;
						</text>
					</view>
				</view>
			</view>
		</view>
		<!-- 功能按钮 -->
		<view class="pages-card btn-list" style="padding-top: 0;padding-bottom: 0;">
			<view class="btn-item row-box" @click="$fn.toPages('/pages/area/performanceData')">
				<image class="icon" src="/static/images/my/icon-1.png" mode="scaleToFill"></image>
				<view class="title fc-3 ">
					区域代理业绩分润
				</view>
				<u-icon name="arrow-right" color="#999" size="16"></u-icon>
			</view>
			<view class="btn-item row-box">
				<image class="icon" src="/static/images/my/icon-2.png" mode="scaleToFill"></image>
				<view class="title fc-3 ">
					提现绑定账号管理
				</view>
				<u-icon name="arrow-right" color="#999" size="16"></u-icon>
			</view>
		</view>
	</view>

</template>

<script>
	export default {
		data() {
			return {
				dividendList: []
			};
		},
		onLoad() {
			this.setDividendList()
		},
		methods: {
			setDividendList() {
				this.dividendList = [{
						title: '累计分润(元)',
						value: '555.55'
					},
					{
						title: '已提现(元)',
						value: '555.55'
					},
					{
						title: '待结算(元)',
						value: '555.55'
					},
				]
			}
		}
	}
</script>

<style lang="scss" scoped>
	.pages {
		position: relative;
	}

	.pages-card {
		position: relative;
		z-index: 1;
		border-radius: 18rpx;
		overflow: hidden;
		margin: 0 auto 20rpx;
		padding-left: 30rpx;
		padding-right: 30rpx;
	}

	.pages-bgimg {
		width: 750rpx;
		height: 678rpx;
		position: absolute;
		top: calc(678 - (678 - 490))rpx;
		left: 0;
		z-index: 0;
	}

	// 顶部 个人信息
	.my-top-box {
		position: relative;
		z-index: 1;
		padding: 40rpx 44rpx 50rpx;

		.userinfo-box {
			padding: 0 24rpx;
		}

		.userinfo {
			flex: 1;
			align-items: center;

			.avatar-box {
				border-radius: 50%;
				position: relative;
				margin-right: 30rpx;

				.avatar {
					width: 120rpx;
					height: 120rpx;
					border-radius: 50%;
					overflow: hidden;
					border: 4rpx solid #FFF;
					position: relative;
					z-index: 0;
					background-color: #f5f5f5;
				}

				.position {
					width: 90rpx;
					height: 44rpx;
					background-color: #fff;
					border-radius: 16rpx;
					position: absolute;
					bottom: -10rpx;
					left: 50%;
					transform: translateX(-50%);
					z-index: 1;
				}
			}

			.info-box {
				flex: 1;

				.nickname {
					font-size: 36rpx;
					font-weight: bold;

					margin-bottom: 10rpx;
				}

				.info-phone {
					color: rgba(255, 255, 255, 0.5);
				}

				.info-notes {
					.info-notes-btn {
						padding: 2rpx 16rpx;
						background: rgba(255, 255, 255, 0.2);
						border-radius: 200rpx 200rpx 200rpx 200rpx;
						border: 2rpx solid rgba(255, 255, 255, 0.4);
						color: #fff;
					}

					.info-notes-text {
						color: #fff;
					}
				}
			}
		}

		.rqimg-icon {
			width: 44rpx;
			height: 44rpx;
		}
	}

	//提现
	.cash-box {
		position: relative;
		z-index: 1;

		.cash {
			line-height: 80rpx;
			font-size: 72rpx;
			margin: 12rpx 0 30rpx;
		}

		.cash-btn {
			width: 240rpx;
			height: 80rpx;
			border-radius: 12rpx;
			background-color: #00A191;
			line-height: 1rem;
		}
	}

	.btn-item {
		height: 100rpx;
		border-bottom: 1rpx solid #ededed;

		&:last-child {
			border-bottom: 0;
		}

		.icon {
			width: 48rpx;
			height: 48rpx;
			flex-shrink: 0;
		}

		.title {
			flex: 1;
			padding: 0 30rpx;
		}

		.avatar {
			width: 48rpx;
			height: 48rpx;
			border-radius: 50%;
			overflow: hidden;
			flex-shrink: 0;
			margin: 0 10rpx;
		}

		.nickname {
			max-width: 260rpx;
			margin-right: 20rpx;
		}
	}
</style>